import request from '@/utils/request'

export default {
  planList(params) {
    return request({
      url: '/v1/plansList',
      method: 'get',
      params
    })
  },
  getOne(id) {
    return request({
      url: `/v1/plans/${id}`,
      method: 'get'
    })
  },
  update(data) {
    return request({
      url: '/v1/plansUpdate',
      method: 'post',
      data
    })
  },
  create(data) {
    return request({
      url: '/v1/plansAdd',
      method: 'post',
      data
    })
  },
  delete(id) {
    return request({
      url: `/v1/plansDel/${id}`,
      method: 'get'
    })
  },
  append(data) {
    return request({
      url: '/v1/plansAppend',
      method: 'post',
      data
    })
  },
  remove(data) {
    return request({
      url: '/v1/plansRemove',
      method: 'post',
      data
    })
  },
  excel(data) {
    return request({
      url: '/v1/plans1Excel',
      method: 'post',
      data
    })
  },
  appendMember(data) {
    return request({
      url: '/v1/plansMemberAppend',
      method: 'post',
      data
    })
  },
  removeMember(data) {
    return request({
      url: '/v1/plansMemberRemove',
      method: 'post',
      data
    })
  },
  appendParts(data) {
    return request({
      url: '/v1/plansPartsAppend',
      method: 'post',
      data
    })
  },
  removeParts(data) {
    return request({
      url: '/v1/plansPartsRemove',
      method: 'post',
      data
    })
  },
  appendTask(data) {
    return request({
      url: '/v1/plansTaskAppend',
      method: 'post',
      data
    })
  },
  removeTask(data) {
    return request({
      url: '/v1/plansTaskRemove',
      method: 'post',
      data
    })
  },
  appendTaskGroup(data) {
    return request({
      url: '/v1/plansTaskGroupAppend',
      method: 'post',
      data
    })
  }
}
